#ifndef F_CAConsumerC_h
#define F_CAConsumerC_h

// ***********************************************************************

// class EDROOMTopContext

// ***********************************************************************



class EDROOMTopContext {

protected:

enum EDROOMCAConsumerSignal { EDROOMSignalTimeout, EDROOMSignalDestroy, SData, SConReady };


	friend class CAConsumer;

	CAConsumer &EDROOMcomponent;

	CEDROOMMessage * &Msg;

	CEDROOMMessage * &MsgBack;

	//Ports

	CEDROOMInterface & pIn;

	enum edroomStateId{I, Ready, SubEstado2};

	enum IdTrans{Init, ShowData,  EDROOMMEMORIA };

	//Constantes



	//Variables



	//Pool



	// CONSTRUCTORES

	EDROOMTopContext (CAConsumer &act );

	EDROOMTopContext ( EDROOMTopContext &contex );

public:

	bool EDROOMSearchContextTrans(TEDROOMTransId &edroomCurrentTrans);

	void EDROOMNuevoMens () { EDROOMcomponent.EDROOMNewMsg(); }

	// Funciones Definidas por el usuario

	void	FConReady();

	void	FShowData();

};

// ***********************************************************************

// class EDROOMTopState

// ***********************************************************************



class EDROOMTopState : public EDROOMTopContext {

protected:



	EDROOMTopContext::edroomStateId edroomCurrentState;

	EDROOMTopContext::edroomStateId edroomNextState;

	//Variables



	//Pools



public:

	// CONSTRUCTOR

	EDROOMTopState (CAConsumer &act );


	// EDROOMBehaviour**********************************************

	void EDROOMBehaviour();

	// Inicio**********************************************

	void EDROOMInicio();

	// ***********************************************************************

	// SubEstado Inicial 

	// ***********************************************************************



	TEDROOMTransId EDROOMIllegada();

	// ***********************************************************************

	// SubEstado Hoja Ready

	// ***********************************************************************



	TEDROOMTransId EDROOMReadyllegada();

	// ***********************************************************************

	// SubEstado Hoja SubEstado2

	// ***********************************************************************



	TEDROOMTransId EDROOMSubEstado2llegada();

};


#endif
